﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yunzuan.Foundation.Attributes;
using Yunzuan.Foundation.Entities;

namespace CloudDiamonds.Models.DBModels
{
    [Table(TableName = "yz_Inventory", PrimaryKey = "ID")]
    public class InventoryInfo : BaseEntity
    {
        private long? _id;
        private string _supplier;
        private string _place;
        private string _sn;
        private string _originSN;
        private int _shape;
        private decimal? _weight;
        private string _color;
        private string _clarity;
        private string _cut;
        private string _polish;
        private string _symmetry;
        private string _fluorescence;
        private string _certType;
        private string _certNo;
        private string _comments;
        private string _milky;
        private short _stock;
        private int? _onShelves;//上下架状态 12-23

        private decimal? _purchaseDiscountReturn;//12-26 采购价三字段 备注属性
        private decimal? _purchaseUSDPerCarat;//12-26
        private decimal? _purchaseUSDPerGrain;//12-26

        private decimal? _purchaseRMB;//01-09
        private decimal? _purchaseExchange;//01-09
        private string _purchaseSupplier;//01-09

        private decimal? _sourceDiscountReturn;
        private decimal? _discountReturn;
        private decimal? _sourceDolarPerGrain;
        private decimal? _rMBPerGrain;
        private decimal? _rMBPerCarat;
        private decimal? _dolarPerGrain;
        private decimal? _dolarPerCarat;
        private int? _userID;
        private string _importTransNo;
        private int? _sysStatus;
        private DateTime _createTime;
        private DateTime _updateTime;
        private string _measurementMin;
        private string _measurementMax;
        private string _measurementHeight;
        private string _measurement;
        private decimal? _uSDPerCarat;
        private decimal? _uSDPerGrain;
        private decimal? _rapnet;
        private string _hA;
        private string _hue;
        private string _otherComments;
        private short _isFancy;

        private string _blackDefect;
        private string _otherDefect;
        private string _eyeClean;
        private string _hDImageUrl;
        private string _h3DImageUrl;
        private decimal? _purchaseprice;
        private DateTime _arrivaldate;
        private long? _customerId;
        private decimal? _suppliersBuyRMB;
        private string _suppliersProvider;
        private decimal? _spotPlus;

        private int? _goodsstatus;
        private int? _receiptStatus;
        private string _goodscomments;
        private DateTime? _purchaseTime;
        private DateTime? _shipTime;
        #region 公共属性

        public long? ID
        { get; set; }
        /// <summary>
        /// 二级客户临时为供货商
        /// </summary>
        public long? CustomerID
        { get; set; }
        /// <summary>
        /// 供应商代码
        /// </summary>
        public string Supplier
        { get; set; }

        /// <summary>
        /// 供货地点
        /// </summary>
        public string Place
        { get; set; }

        public string SN
        { get; set; }

        /// <summary>
        /// 源货号
        /// </summary>
        public string OriginSN
        { get; set; }

        /// <summary>
        /// 形状：1.圆形，2.梨形，3.心形...
        /// </summary>
        public int Shape
        { get; set; }

        public decimal? Weight
        { get; set; }

        public string Color
        { get; set; }

        public string Clarity
        { get; set; }

        public string Cut
        { get; set; }

        /// <summary>
        /// 抛光
        /// </summary>
        public string Polish
        { get; set; }

        /// <summary>
        /// 对称
        /// </summary>
        public string Symmetry
        { get; set; }

        /// <summary>
        /// 对称
        /// </summary>
        public string Fluorescence
        { get; set; }


        /// <summary>
        /// 证书类型
        /// </summary>
        public string CertType
        { get; set; }

        /// <summary>
        /// 证书类型
        /// </summary>
        public string CertNo
        { get; set; }

        /// <summary>
        /// 台面羽状：None, fe, fe1, fe2, fe3
        /// </summary>
        public string Comments
        { get; set; }

        /// <summary>
        /// 奶色
        /// </summary>
        public string Milky
        { get; set; }


        /// <summary>
        /// 现货：0.否，1.是
        /// </summary>
        public short Stock
        { get; set; }

        /// <summary>
        /// OnShelves 上下架状态
        /// </summary>
        public int? OnShelves
        { get; set; }

        /// <summary>
        /// 彩钻 0.否,1.是
        /// /// 
        /// </summary>
        public short IsFancy
        { get; set; }

        /// <summary>
        /// PurchaseDiscountReturn 采购退点
        /// </summary>
        public decimal? PurchaseDiscountReturn
        { get; set; }

        /// <summary>
        /// PurchaseUSDPerCarat 采购每卡价
        /// </summary>
        public decimal? PurchaseUSDPerCarat
        { get; set; }


        /// <summary>
        /// PurchaseUSDPerGrain 采购总价
        /// </summary>
        public decimal? PurchaseUSDPerGrain
        { get; set; }


        /// <summary>
        /// PurchaseRMB
        /// </summary>
        public decimal? PurchaseRMB
        {
            get
            {
                if (_purchaseRMB == null)
                    _purchaseRMB = 0;
                return _purchaseRMB;
            }
            set
            {
                this.ChangeNotify<decimal?>("PurchaseRMB", value, ref _purchaseRMB);
            }
        }

        /// <summary>
        /// PurchaseExchange
        /// </summary>
        public decimal? PurchaseExchange
        {
            get
            {
                if (_purchaseExchange == null)
                    _purchaseExchange = 0;
                return _purchaseExchange;
            }
            set
            {
                this.ChangeNotify<decimal?>("PurchaseExchange", value, ref _purchaseExchange);
            }
        }

        /// <summary>
        /// PurchaseSupplier
        /// </summary>
        public string PurchaseSupplier
        { get; set; }

        /// <summary>
        /// 原退点.
        /// </summary>
        public decimal? SourceDiscountReturn
        {
            get
            {
                if (_sourceDiscountReturn == null)
                    _sourceDiscountReturn = 0;
                return _sourceDiscountReturn;
            }
            set
            {
                this.ChangeNotify<decimal?>("SourceDiscountReturn", value, ref _sourceDiscountReturn);
            }
        }

        /// <summary>
        /// 退点.
        /// </summary>
        public decimal? DiscountReturn
        {
            get
            {
                if (_discountReturn == null)
                    _discountReturn = 0;
                return _discountReturn;
            }
            set
            {
                this.ChangeNotify<decimal?>("DiscountReturn", value, ref _discountReturn);
            }
        }


        /// <summary>
        /// 原单粒价$
        /// </summary>
        public decimal? SourceDolarPerGrain
        {
            get
            {
                if (_sourceDolarPerGrain == null)
                    _sourceDolarPerGrain = 0;
                return _sourceDolarPerGrain;
            }
            set
            {
                this.ChangeNotify<decimal?>("SourceDolarPerGrain", value, ref _sourceDolarPerGrain);
            }
        }

        /// <summary>
        /// 源 美金USD/卡
        /// </summary>
        public decimal? SourceDolarPerCarat { get; set; }


        public decimal? DolarPerGrain
        { get; set; }

        public decimal? DolarPerCarat
        { get; set; }

        /// <summary>
        /// RMB/粒
        /// </summary>
        public decimal? RMBPerGrain
        { get; set; }

        /// <summary>
        /// RMB/Ct.
        /// </summary>
        public decimal? RMBPerCarat
        { get; set; }



        /// <summary>
        /// 最后操作的用户id
        /// </summary>
        public int? UserID
        { get; set; }

        public string ImportTransNo
        { get; set; }

        /// <summary>
        /// 数据状态：0.已删除, 1.正常, 2.订单中, 3.已售出
        /// </summary>
        public int? SysStatus
        { get; set; }

        public DateTime CreateTime
        { get; set; }

        public DateTime UpdateTime
        { get; set; }

        #endregion
        public int Tag { get; set; } //tinyint(1) NOT NULL DEFAULT '0' COMMENT '标签',
        /// <summary>
        /// MeasurementMin
        /// </summary>
        public string MeasurementMin
        { get; set; }

        /// <summary>
        /// MeasurementMax
        /// </summary>
        public string MeasurementMax
        { get; set; }

        /// <summary>
        /// MeasurementHeight
        /// </summary>
        public string MeasurementHeight
        { get; set; }

        /// <summary>
        /// Measurement
        /// </summary>
        public string Measurement
        { get; set; }



        /// <summary>
        /// USD/Ct.
        /// </summary>
        public decimal? USDPerCarat
        { get; set; }

        /// <summary>
        /// USD/Grain.
        /// </summary>
        public decimal? USDPerGrain
        { get; set; }

        /// <summary>
        /// HA
        /// </summary>
        public string HA
        { get; set; }

        /// <summary>
        /// Hue
        /// </summary>
        public string Hue
        { get; set; }

        /// <summary>
        /// OtherComments
        /// </summary>
        public string OtherComments
        { get; set; }


        /// <summary>
        /// BlackDefect
        /// </summary>
        public string BlackDefect
        { get; set; }

        /// <summary>
        /// OtherDefect
        /// </summary>
        public string OtherDefect
        { get; set; }

        /// <summary>
        /// 肉眼
        /// </summary>
        public string EyeClean
        { get; set; }

        /// <summary>
        /// HDImageUrl
        /// </summary>
        public string HDImageUrl
        { get; set; }

        /// <summary>
        /// H3DImageUrl
        /// </summary>
        public string H3DImageUrl
        { get; set; }
        /// <summary>
        /// 采购买入价格
        /// </summary>
        public decimal? PurchasePrice
        { get; set; }
        /// <summary>
        /// 现货到货日期
        /// </summary>
        public DateTime ArrivalTime
        { get; set; }

        /// <summary>
        /// 供应商买入价格RMB
        /// </summary>
        public decimal? SuppliersBuyRMB
        { get; set; }


        /// <summary>
        /// 供应商 货物源头
        /// </summary>

        public string SuppliersProvider
        { get; set; }


        public decimal? SpotPlus
        { get; set; }
        /// <summary>
        /// 货品状态
        /// </summary>
        public int? GoodsStatus
        { get; set; }
        /// <summary>
        /// 货品备注
        /// </summary>
        public string GoodsComments
        { get; set; }

        public decimal? Rapnet
        { get; set; }


        private int? _status;
        /// <summary>
        /// 数据状态：0.已删除, 1.正常, 2.订单中, 3.已售出
        /// </summary>
        public int? Status
        { get; set; }
        /// <summary>
        /// 付款状态：0未付 1，已付
        /// </summary>
        public int? ReceiptStatus
        { get; set; }
        //public string PurchaseSupplier
        //{
        //    get { return _purchaseSupplier; }
        //    set
        //    {
        //        this.ChangeNotify<string>("PurchaseSupplier", value, ref _purchaseSupplier);

        //    }
        //}
        //public decimal? PurchaseExchange
        //{
        //    get { return _purchaseExchange; }
        //    set
        //    {
        //        this.ChangeNotify<decimal>("PurchaseExchange", value, ref _purchaseExchange);

        //    }
        //}
        public DateTime? PurchaseTime
        { get; set; }
        public DateTime? ShipTime
        { get; set; }
        public string PurchaseAgent
        { get; set; }
        //public decimal? PurchaseRMB
        //{
        //    get { return _purchaseRMB; }
        //    set
        //    {
        //        this.ChangeNotify<string>("PurchaseRMB", value, ref _purchaseRMB);

        //    }
        //}
    }
}
